package W072_081.src.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

public class User implements Comparable<User> , Serializable {
    private Long id;
    private String username;
    private String password;
    private LocalDateTime longinTime;

    public User(Long id, String username, String password, LocalDateTime longinTime) {
        this(username, password, longinTime);
        this.id = id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public void setLonginTime(LocalDateTime longinTime) {
        this.longinTime = longinTime;
    }
    public Long getId() {
        return id;
    }
    public String getUsername() {
        return username;
    }
    public String getPassword() {
        return password;
    }
    public LocalDateTime getLonginTime() {
        return longinTime;
    }
    public User(String username, String password, LocalDateTime longinTime) {
        super();
        this.username = username;
        this.password = password;
        this.longinTime = longinTime;
    }
    @Override
    public int compareTo(User o) {
        return this.id.compareTo(o.id);
    }
}
